package cn.tx.customer;

import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author Mxb
 * @version 1.0
 * @date 2020/10/4 9:58
 */
@Component
public class WorkCustomer {
    @RabbitListener(queuesToDeclare = @Queue("work"))
    public void receive1(String message) {
        System.out.println("work message1 = " + message);
        System.out.println("=====消费完毕=====");
    }

    @RabbitListener(queuesToDeclare = @Queue("work"))
    public void receive2(String message) {
        System.out.println("work message2 = " + message);
        System.out.println("=====消费完毕=====");
    }
}
